interface Person {
    name: string
    age: number
}

interface Abin {
    name: string
    age: number
    hobbies: string[]
}

let person: Person = {
    name: '',
    age: 20
}

let abin: Abin = {
    name: 'abin',
    age: 30,
    hobbies: ['play']
}

person = abin
// abin = person

let printHobbies: (abin: Abin) => void
printHobbies = (abin) => {
    console.log(abin.hobbies)
}

let printName: (person: Person) => void
printName = (person) => {
    console.log(person.name)
}

printHobbies = printName

// printName = printHobbies